<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>
<style>
    .layui-card .layui-form .layui-form-label {
        width: 140px;
    }
</style>

<div class="layui-fluid">

    <div class="layui-card">

        <div class="layui-card-body">

            <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="difficultId" th:value="${difficultRatio.difficultId}">
                <div class="layui-form-item">
                    <label style="color: #9F9F9F;">该系数主要用于计价器调整销售价格，未获取到，则默认系数为1，系数值范围： 0.5≤x≤2.0，最多两位小数</label>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">名称：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="difficultName" autocomplete="off" class="layui-input" th:value="${difficultRatio.difficultName}" maxlength="20" lay-verify="required">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">系数值：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="ratio" autocomplete="off" class="layui-input" th:value="${difficultRatio.ratio==null?'':#numbers.formatDecimal(difficultRatio.ratio ,1,'COMMA',2,'POINT')}" maxlength="4" lay-verify="required|ratio">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否影响内部价：</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="effectInnerPrice" value="2" title="是" th:checked="${difficultRatio.effectInnerPrice==null||difficultRatio.effectInnerPrice == 2}">
                        <input type="radio" name="effectInnerPrice" value="1" title="否" th:checked="${difficultRatio.effectInnerPrice== 1}">
                    </div>
                    <div>
                        <label style="color: #9F9F9F;width: 400px">选择影响销售价的同时是否影响内部价</label>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>

                <!--按钮栏
                    置于form标签内的最下方，
                    主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                    -->
                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button onclick="zmnLayUtil.closeThisIframe(parent,{reloadPage: true})" class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">
    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        serv_difficultratio_edit: "difficult/ratio/zmn.plat.difficultratio.edit",
    }).use(['index', 'serv_difficultratio_edit']);

</script>